using OutpatientApi.DTO;
using Outpatient.ErrorCode;
using Outpatient.Doman.Smart;

namespace OutpatientApi.Methodimplementation.IServices
{
    /// <summary>
    /// 病人挂号服务接口
    /// </summary>
    public interface IPatientRegistrationService
    {
        /// <summary>
        /// 添加病人挂号
        /// </summary>
        /// <param name="addDto">添加病人挂号参数</param>
        /// <returns>添加结果</returns>
        Task<ApiResult<int>> AddPatientRegistrationAsync(AddPatientRegistrationDto addDto);

        /// <summary>
        /// 获取所有号类数据
        /// </summary>
        /// <returns>号类数据列表</returns>
        Task<ApiResult<List<NumberCategoryDto>>> GetAllNumberCategoriesAsync();

        /// <summary>
        /// 获取所有科室信息
        /// </summary>
        /// <returns>科室信息列表</returns>
        Task<ApiResult<List<DepartmentInfoDto>>> GetAllDepartmentInfosAsync();

        /// <summary>
        /// 获取所有医生信息
        /// </summary>
        /// <returns></returns>
        Task<ApiResult<List<GetDepartmentInfoDto>>> GetDepartmentInfo();

        /// <summary>
        /// 添加医疗卡办理
        /// </summary>
        /// <param name="addDto">添加医疗卡办理参数</param>
        /// <returns>添加结果</returns>
        Task<ApiResult<int>> AddMedicalCardRegistrationAsync(AddMedicalCardRegistrationDto addDto);

        /// <summary>
        /// 获取所有民族数据
        /// </summary>
        /// <returns>民族数据列表</returns>
        Task<ApiResult<List<EthnicGroupDto>>> GetAllEthnicGroupsAsync();

        /// <summary>
        /// 获取所有文化程度数据
        /// </summary>
        /// <returns>文化程度数据列表</returns>
        Task<ApiResult<List<CultureDto>>> GetAllCulturesAsync();

        /// <summary>
        /// 获取所有职业数据
        /// </summary>
        /// <returns>职业数据列表</returns>
        Task<ApiResult<List<OccupationDto>>> GetAllOccupationsAsync();

        /// <summary>
        /// 查询病人挂号信息
        /// </summary>
        /// <param name="patientName">患者姓名（可选）</param>
        /// <param name="registerNo">挂号单号（可选）</param>
        /// <param name="idNumber">身份证号（可选）</param>
        /// <returns>病人挂号信息列表</returns>
        Task<ApiResult<List<GetPatientRegistrationDto>>> GetPatientRegistrationsAsync(string? patientName = null, string? registerNo = null, string? idNumber = null);

        /// <summary>
        /// 查询消费明细信息（多表连查）
        /// </summary>
        /// <param name="patientName">患者姓名（可选）</param>
        /// <param name="registerNo">挂号单号（可选）</param>
        /// <param name="drugName">药品名称（可选）</param>
        /// <param name="patientRegistrationId">病人挂号ID（可选）</param>
        /// <returns>消费明细信息列表</returns>
        Task<ApiResult<List<GetConsumptionDetailsDto>>> GetConsumptionDetailsAsync(string? patientName = null, string? registerNo = null, string? drugName = null, int? patientRegistrationId = null);

        /// <summary>
        /// 门诊结账
        /// </summary>
        /// <param name="checkoutDto">结账信息</param>
        /// <returns>结账结果</returns>
        Task<ApiResult<CheckoutResponseDto>> CheckoutAsync(CheckoutRequestDto checkoutDto);
    }
} 